# ACM/urls.py
"""
URL configuration for ACM project.
"""

from django.contrib import admin
from django.urls import path, include
from rest_framework.documentation import include_docs_urls
from rest_framework.schemas import get_schema_view
from rest_framework.permissions import AllowAny

# 使用新的 schema view
schema_view = get_schema_view(
    title="ACM API文档",
    description="Codeforces数据监控系统API文档",
    public=True,
    permission_classes=[AllowAny],
)

urlpatterns = [
    path("admin/", admin.site.urls),
    path("api/cf/", include("cf.urls")),
    path("api/docs/", include_docs_urls(title="ACM API文档")),  # 保留原有文档
    path("api/schema/", schema_view, name="schema"),  # 添加新的schema视图
]